{% extends "base.html" %}

{% block content %}

<table width="100%" cellspacing="0" cellpadding="3">
  <tr bgcolor="#C8C8C8">
    <th>Actions</th>
    <th align="left">Title</th>
    <th align="left">Public URL</th>
    <th>Created (Y/M/D)</th>
    <th>Updated (Y/M/D)</th>
  </tr>

{% for page in pages %}
  <tr bgcolor="#F0F0F0">
    <td align="center">
      <a href="/delete?key={{page.key}}"><img src="/images/user-trash-full.png" alt="Delete page" border="0" /></a>
      <a href="/edit?key={{page.key}}"><img src="/images/accessories-text-editor.png" alt="Edit page" border="0" /></a>
    </td>
    <td valign="top"><b><a href="/view/{{ page.key }}">{% if page.title %}{{ page.title }}{% else %}<em>no title</em>{% endif %}</a></b></td>
    <td>
      {% if page.public %}
        <a href="/p/{{page.public_id}}">http://pages.lignu.no/p/{{page.public_id}}</a> - {{ page.views }} views
      {% else %}not public{% endif %}
    </td>
    <td align="center">{{ page.created }}</td>
    <td align="center">{{ page.updated }}</td>
  </tr>
{% endfor %}

</table>

{% endblock %}
